//pages
import Login from '../views/login'
import Home from '../views/home'
import NotFound from '../views/common/NotFound.vue'

//引入首页子组件
import ProjectList from '../views/project'
import ProjectEdit from '../views/project/Edit'
import PurchaseList from '../views/purchase'
import PurchaseEdit from '../views/purchase/Edit'
import Setting from '../views/setting'

const routes = [{
    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    component: Login,
    meta: {
      notLogin: true,
      layout: 'blank-layout'
    }
  },
  //添加一个别名来替代path
  {
    path: '/home',
    name: 'myhome',
    component: Home,
    meta: {title: '美少女智能采购系统'}
  },
  {path: '/project/list', component:ProjectList},
  {path: '/project/edit', component:ProjectEdit},
  {path: '/purchase/list', component:PurchaseList},
  {path: '/purchase/list', component:PurchaseEdit},
  {path: '/setting', component:Setting},
  {
    path: '*',
    component: NotFound
  },
]

export default routes